import math
precision = eval(input())
s = 0
flag = 1
denominator = 1
item = 1
while math.fabs(item)>=precision:
    s+=item
    denominator+=2
    flag= - flag
    item = flag/denominator
s += item
print(4*s)
